package com.iengine.services.api.command.chat;

import java.util.Calendar;
import java.util.Date;
import java.util.Map;

@SuppressWarnings({"unchecked","rawtypes"})
public class CommandRobotAge extends AbstractTxtPhoneApiCommand{
	
	@Override
	protected Map formatArgs(Map map, Map nlpParams) {
		
		Calendar nowCalendar = Calendar.getInstance();
		Calendar birthCalendar = Calendar.getInstance(); 
		birthCalendar.set(2015, 1, 0);
		int age = nowCalendar.get(Calendar.YEAR) - birthCalendar.get(Calendar.YEAR) + 1;
		String resultData = age + "岁";
		map = addValue(map, isDirectReturn(), resultData);
		return map;
	}
	
	public static void main(String args[]){
		System.out.println("sfd");
		Calendar nowCalendar = Calendar.getInstance();
		Calendar birthCalendar = Calendar.getInstance(); 
		birthCalendar.set(2015, 1, 0);
		System.out.println(nowCalendar.get(Calendar.YEAR) - birthCalendar.get(Calendar.YEAR));
	}
	
}
